summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvnflinger/buffer_queue_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nvnflinger/buffer_queue_defs.h')
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_defs.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/hle/service/nvnflinger/buffer_queue_defs.h b/src/core/hle/service/nvnflinger/buffer_queue_defs.h
new file mode 100644
index 000000000..6fd3156f4
--- /dev/null
+++ b/src/core/hle/service/nvnflinger/buffer_queue_defs.h
@@ -0,0 +1,21 @@
+// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
+// SPDX-FileCopyrightText: Copyright 2014 The Android Open Source Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+// Parts of this implementation were based on:
+// https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/include/gui/BufferQueueDefs.h
+
+#pragma once
+
+#include <array>
+
+#include "common/common_types.h"
+#include "core/hle/service/nvnflinger/buffer_slot.h"
+
+namespace Service::android::BufferQueueDefs {
+
+// BufferQueue will keep track of at most this value of buffers.
+constexpr s32 NUM_BUFFER_SLOTS = 64;
+
+using SlotsType = std::array<BufferSlot, NUM_BUFFER_SLOTS>;
+
+} // namespace Service::android::BufferQueueDefs